from flask import jsonify
from flask import redirect
from flask import render_template
from toutiao import app

#自定义捕捉异常，此功能未实现，在此备注用法
@app.errorhandler(404)
def badrequest(e):
    # return render_template('404.html')
    # return jsonify({'msg':404})
    return redirect('http://www.baidu.com')